<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditAdresseTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditAdresseLabel_id}" for="id" />
                    <h:inputText id="id" value="#{AdresseBean.selected.id}" title="#{bundle.EditAdresseTitle_id}" required="true" requiredMessage="#{bundle.EditAdresseRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditAdresseLabel_codePostal}" for="codePostal" />
                    <h:inputText id="codePostal" value="#{AdresseBean.selected.codePostal}" title="#{bundle.EditAdresseTitle_codePostal}" required="true" requiredMessage="#{bundle.EditAdresseRequiredMessage_codePostal}"/>
                    <h:outputLabel value="#{bundle.EditAdresseLabel_ville}" for="ville" />
                    <h:inputText id="ville" value="#{AdresseBean.selected.ville}" title="#{bundle.EditAdresseTitle_ville}" />
                    <h:outputLabel value="#{bundle.EditAdresseLabel_pays}" for="pays" />
                    <h:inputText id="pays" value="#{AdresseBean.selected.pays}" title="#{bundle.EditAdresseTitle_pays}" />
                    <h:outputLabel value="#{bundle.EditAdresseLabel_adresse1}" for="adresse1" />
                    <h:inputText id="adresse1" value="#{AdresseBean.selected.adresse1}" title="#{bundle.EditAdresseTitle_adresse1}" />
                    <h:outputLabel value="#{bundle.EditAdresseLabel_adresse2}" for="adresse2" />
                    <h:inputText id="adresse2" value="#{AdresseBean.selected.adresse2}" title="#{bundle.EditAdresseTitle_adresse2}" />
                    <h:outputLabel value="#{bundle.EditAdresseLabel_client}" for="client" />
                    <h:selectOneMenu id="client" value="#{AdresseBean.selected.client}" title="#{bundle.EditAdresseTitle_client}" >
                        <f:selectItems value="#{clientController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{AdresseBean.update}" value="#{bundle.EditAdresseSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditAdresseViewLink}"/>
                <br />
                <h:commandLink action="#{AdresseBean.prepareList}" value="#{bundle.EditAdresseShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditAdresseIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
